package zero.boot.freemarkerdemo.service;

import org.springframework.stereotype.Service;
import zero.project.advice.annotation.AdviceInfo;
import zero.project.advice.interfaces.InvokeAdvice;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Service
@AdviceInfo(name = "1", order = "0")
public class Service1 implements InvokeAdvice {
    @Override
    public void beforeInvoke(List<Object> args, HttpServletRequest req) {
        System.out.println("执行 111 的前置通知");
    }

    @Override
    public void afterInvoke(Object result, HttpServletRequest req) {
        System.out.println("执行 111 的后置通知");
        System.out.println(result);
    }
}
